package com.ld.admin.model.system;

import java.util.Date;
import java.util.List;

import com.ld.shieldsb.annotation.field.db.OnlyShow;
import com.ld.shieldsb.annotation.field.link.Many2Many;
import com.ld.shieldsb.annotation.model.ModelAnno.Model;
import com.ld.shieldsb.annotation.model.ModelAnno.TableName;
import com.ld.shieldsb.common.web.model.SysUser;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
 * 用户类（方便具体项目扩展），继承自sysUser(sys_user)
 * 
 * @ClassName SysTimedtaskModel
 * @author <a href="mailto:donggongai@126.com" target="_blank">吕凯</a>
 * @date 2019年01月04日 14:29:47
 *
 */
@Model(name = "用户")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_user")
@ToString(callSuper = true)
public class SystemUser extends SysUser {
    private static final long serialVersionUID = 2141576419459259712L;
    /*创建人姓名*/
    private String createName;
    /*修改人姓名*/
    private String updateName;
    /*入职时间*/
    private Date entryDate;
    /*离职时间*/
    private Date exitDate;
    /*活跃值*/
    private Double activeValue;
    /*用户角色*/

    @OnlyShow
    @Many2Many(relation = SysUserRolesModel.class, relationFrom = "userId", relationTo = "roleId")
    private List<SysRoleModel> userRoles;

    /**
     * 登录时用，临时账号
     */
    @OnlyShow
    private SysUserTempModel loginTempUser;

}
